package org.jing.ext.web;

import org.jing.core.lang.itf.JEnum;
import org.jing.core.util.ClassUtil;
import org.jing.core.util.GenericUtil;

/**
 * Description: <br>
 *
 * @author bksmate <br>
 * @since 2024-12-24 <br>
 */
public enum RequestMethod implements JEnum<String> {
    GET("GET"), POST("POST");

    private final String value;

    RequestMethod(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    @Override public boolean equalsByType(Object... objects) {
        return GenericUtil.count(objects) > 0 && getValue().equalsIgnoreCase(ClassUtil.cast2String(objects[0]));
    }

    @Override public String output() {
        return value;
    }
}
